import requests

class FirmwareUpdater:
    def check_update(self) -> str:
        """检查更新"""
        return requests.get("https://firmware.example.com/latest").text

    def update(self, firmware_file: str):
        """执行更新"""
        os.system(f"dfu-util -D {firmware_file}")